package com.wulijie.command;

/**
 * @Author cui
 * @Data
 */
public class OffCommand implements Command {
    private CommandReceiver commandReceiver;

    public OffCommand(CommandReceiver commandReceiver) {
        this.commandReceiver = commandReceiver;
    }

    @Override
    public void execute() {
        commandReceiver.offLight();
    }

    @Override
    public void undo() {
        commandReceiver.onLight();
    }
}
